#!/bin/csh

setenv Linux_Flavour_ "@_linux_flavour@"
setenv System_ "@_system@"
. @_BINDIR@/check_system.csh
if ( "$same_system" == "1" ) then 
	setenv SIMPATH "@SIMPATH@"
	setenv ROOTSYS "@ROOTSYS@"
	setenv FAIRROOTPATH "@FAIRROOTPATH@"
	if ( @FULL_CONFIG_FILE@ == true ) then
		setenv GEANT4_LIBRARY_DIR "@GEANT4_LIBRARY_DIR@"
		setenv GEANT4_INCLUDE_DIR "@GEANT4_INCLUDE_DIR@"
		setenv GEANT4VMC_INCLUDE_DIR "@GEANT4VMC_INCLUDE_DIR@"
		setenv GEANT4VMC_LIBRARY_DIR "@GEANT4VMC_LIBRARY_DIR@"
		setenv GEANT4VMC_MACRO_DIR "@GEANT4VMC_MACRO_DIR@"
		setenv CLHEP_INCLUDE_DIR "@CLHEP_INCLUDE_DIR@"
		setenv CLHEP_LIBRARY_DIR "@CLHEP_LIBRARY_DIR@"
		setenv CLHEP_BASE_DIR "@CLHEP_BASE_DIR@"
		setenv PLUTO_LIBRARY_DIR "@PLUTO_LIBRARY_DIR@"
		setenv PLUTO_INCLUDE_DIR "@PLUTO_INCLUDE_DIR@"
		setenv PYTHIA6_LIBRARY_DIR "@PYTHIA6_LIBRARY_DIR@"
		setenv G3SYS "@G3SYS@"
		setenv GEANT3_INCLUDE_DIR "@GEANT3_INCLUDE_DIR@"
		setenv GEANT3_LIBRARY_DIR "@GEANT3_LIBRARY_DIR@"
		setenv GEANT3_LIBRARIES "@GEANT3_LIBRARIES@"
		setenv USE_VGM "1"
		setenv PYTHIA8DATA "@PYTHIA8DATA@"
		setenv CLASSPATH "@MY_CLASSPATH@"

		setenv G4LEDATA "@G4LEDATA@"
		setenv G4LEVELGAMMADATA "@G4LEVELGAMMADATA@"
		setenv G4NeutronHPCrossSections "@G4NeutronHPCrossSections@"
		setenv G4NEUTRONHPDATA "@G4NeutronHPCrossSections@"
		setenv G4NEUTRONXSDATA "@G4NEUTRONXSDATA@"
		setenv G4PIIDATA "@G4PIIDATA@"
		setenv G4RADIOACTIVEDATA "@G4RADIOACTIVEDATA@"
		setenv G4REALSURFACEDATA "@G4REALSURFACEDATA@"
		setenv G4SAIDXSDATA "@G4SAIDXSDATA@"
		setenv G4ENSDFSTATEDATA "@G4ENSDFSTATEDATA@"
	endif
	setenv ROOT_LIBRARY_DIR "@ROOT_LIBRARY_DIR@"
	setenv ROOT_LIBRARIES "@ROOT_LIBRARIES@"
	setenv ROOT_INCLUDE_DIR "@ROOT_INCLUDE_DIR@"
	setenv ROOT_INCLUDE_PATH "@GEANT3_INCLUDE_DIR@:@ROOT_INCLUDE_PATH@"
	setenv VMCWORKDIR "@VMCWORKDIR@"
	setenv FAIRLIBDIR "@FAIRLIBDIR@"
	setenv PYTHONPATH "@MY_PYTHONPATH@"
	switch( $1 )
		case '-a' :
			setenv DYLD_LIBRARY_PATH $DYLD_LIBRARY_PATH:"@MY_DYLD_LIBRARY_PATH@"
			setenv LD_LIBRARY_PATH $LD_LIBRARY_PATH:"@MY_LD_LIBRARY_PATH@"
			setenv PATH $PATH:"@MY_PATH@"
			breaksw
		case '-p' :
			setenv DYLD_LIBRARY_PATH="@MY_DYLD_LIBRARY_PATH@":$DYLD_LIBRARY_PATH
			setenv LD_LIBRARY_PATH="@MY_LD_LIBRARY_PATH@":$LD_LIBRARY_PATH
			setenv PATH="@MY_PATH@":$PATH
			echo "hello"
			breaksw
		case * :
			setenv DYLD_LIBRARY_PATH="@MY_DYLD_LIBRARY_PATH@"
			setenv LD_LIBRARY_PATH="@MY_LD_LIBRARY_PATH@"
			setenv PATH="@MY_PATH@"
			breaksw
	endsw
endif
